package daa.levelup.aCipher;


public class CipherManager {
    public CipherManager() {
        aAlphabet alpha = new aAlphabet();
        aAlphabet.getEverything();
    }

    aCaeasar aC = new aCaeasar(aAlphabet.getEverything());
    aVizener aV = new aVizener(aAlphabet.getEverything());


    public String EncryptAction(String type, String key, String text) {
        String cipher = "";
        if (type.equals("Caesar")) cipher = aC.getEncryption(text, key);
        else {
            if (type.equals("Vizener")) cipher = aV.getEncryption(text, key);
        }
        return cipher;
    }
    public String DecryptAction(String type, String key, String text) {
        if (type.equals("Caesar")) {
            System.out.println(aC.getDecryption(text, key));

        } else {
            if (type.equals("Vizener")) {

                System.out.println(aV.getDecryption(text, key));
            } else {
                return text;
            }
        }
        return text;
    }

}
